package com.lzy.wzy.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.validation.annotation.Validated;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Validated
public class WorkOrderBean implements Serializable {

//    @NotBlank(message = "序号不能为空")
    private String serialNumber;

    private String workOrderNumber; //工单号

    @NotBlank
    private String workType; //工单类型

    @NotBlank
    private String orderNumber; //订单号

    @NotBlank
    private String productCode;  //产品编码

    @NotBlank
    private String productNumber; //产品型号

    @NotBlank
    private String productionQuantity; //生产数量

    @NotNull
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd")
    private LocalDate planBeginTime; //计划开始时间

    @NotNull
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd")
    private LocalDate planEndTime; //计划结束时间

    @NotBlank
    private String softwareVersion; //软件版本

    @NotBlank
    private String remarks; //备注

    private String status; //状态

    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate planCreateTime; //计划创建时间
}
